-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix image-create with ACLs. Fixes #1394. #1395
Fix image-create with ACLs. Fixes #1394. #1395
Conversation
@dhbaird , a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/89576 |
Codecov Report
@@ Coverage Diff @@
## master #1395 +/- ##
==========================================
+ Coverage 46.05% 46.30% +0.24%
==========================================
Files 122 122
Lines 38077 38077
Branches 38077 38077
==========================================
+ Hits 17538 17632 +94
+ Misses 19618 19519 -99
- Partials 921 926 +5
|
@dhbaird , The CI test is completed, please check result:
Congratulations, your test job passed! |
@@ -267,7 +267,7 @@ impl RafsXAttrs { | |||
return Err(einval!("xattr key/value is too big")); | |||
} | |||
for p in RAFS_XATTR_PREFIXES { | |||
if buf.len() > p.as_bytes().len() && &buf[..p.as_bytes().len()] == p.as_bytes() { | |||
if buf.len() >= p.as_bytes().len() && &buf[..p.as_bytes().len()] == p.as_bytes() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixup, it seems we need also to handle this?
https://github.com/dragonflyoss/image-service/blob/34ee8255dea73819f4d634f83260d1fa4fe68c97/rafs/src/metadata/layout/v6.rs#L2088
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps so; I am not 100% sure. I apologize that I have yet produced a test in bats to correspond to testing this. Thank you for the time and consideration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*That I have not yet produced, I mean!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dhbaird, you can add a related test case here, it will be used by the smoke test automatically.
https://github.com/dragonflyoss/image-service/blob/34ee8255dea73819f4d634f83260d1fa4fe68c97/smoke/tests/texture/layer.go#L89
@dhbaird Please also add a signed-off-by for the commit by following https://github.com/dragonflyoss/image-service/pull/1395/checks?check_run_id=15694892551 |
Thanks for the guidance @imeoer! I confirmed that the line you indicated above should change: https://github.com/dragonflyoss/image-service/blob/34ee8255dea73819f4d634f83260d1fa4fe68c97/rafs/src/metadata/layout/v6.rs#L2088 I am working on the tests now and double checking the changes, and will also added signed-off-by. |
Hi again @imeoer, When I tried to update the test indicated in previous comments, I got blocked by a new issue: I read the code and traced it to containerd/archive, where it appears to ignore all xattrs except for Does this look like an issue in containerd/archive now too? Would you recommend that I create an issue over there too? Thanks! |
@dhbaird It seems only the But to keep it simple, I think we just need to add some unit tests for |
7d62fdf
to
a46e709
Compare
Signed-off-by: David Baird <[email protected]>
a46e709
to
689a655
Compare
Hi @imeoer, the code is again ready for review. May you restart the "nydus-unit-test-coverage" automation? Thanks for your helpful feedback and time so far. Any ideas / suggestions / criticisms are welcome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dhbaird for the excellent tests and fixup!
Relevant Issue (if applicable)
Fixes:
#1394
Types of changes
Checklist